import java.util.Observable;



public class ZoomPosition {
	private static ZoomPosition inst=null;
	private double zoom;
	private int x;
	private int y;
	
	
	private ZoomPosObserve observe = new ZoomPosObserve();
	
	
	public class ZoomPosObserve extends Observable{
		
		public void setChanged(){
			
			super.setChanged();
		}


		
		
	}
	
	
	public ZoomPosObserve getObs() {
		
		return observe;
	}
	
	private ZoomPosition(){
		zoom = 1.0;
		x = 0;
		y = 0;
	}

	public static ZoomPosition getInstance(){
		if(inst==null){
			inst= new ZoomPosition();
		}
		return inst;
		
	}
	
	
	public double getZoom() {
		return zoom;
	}

	public void setZoom(double zoom) {
		this.zoom = zoom;
				
		observe.setChanged();
		observe.notifyObservers(this);
	}

	public int getX() {
		return x;
	}

	public void setX(int x) {
		this.x = x;
		
	}

	public int getY() {
		return y;
	}

	public void setY(int y) {
		this.y = y;
		
		observe.setChanged();
		observe.notifyObservers(this);
	}
	
}
